/*--------------------------------------------------------------------
 - File:
 - Data&Autor:
 - Introduction:
 ----------------------------------------------------------------------*/
#ifndef BLE_CONN_H_
#define BLE_CONN_H_
#include "stdint.h"
#include "string.h"
#include "stdbool.h"

//蓝牙广播状态
typedef enum
{
    BLE_ADV_STATE_CLOSE,     //广播关闭状态
    BLE_ADV_STATE_OPEN,      //广播中
    BLE_ADV_STATE_CONNECTED, //蓝牙连接中（广播也是关闭）
} ble_adv_state_t;

void ble_adv_ctrl_init(void);
void ble_adv_start(void);
void ble_adv_stop(void);

bool ble_auto_adv_if_enable(void);
void ble_adv_connect_handle(void);
void ble_adv_disconnect_handle(void);
void ble_adv_restart_check(void);

void advertising_init(bool bool_fast);
//uint8_t device_adv_name_update(uint8_t *p_name, uint8_t name_len);
void device_adv_name_restore_flash(void);
#endif
